package com.ygqh.baby.service;

import com.foxinmy.weixin4j.exception.WeixinException;
import com.foxinmy.weixin4j.http.weixin.JsonResult;
import com.foxinmy.weixin4j.model.MediaDownloadResult;
import com.foxinmy.weixin4j.model.MediaUploadResult;

import java.io.InputStream;

/**
 * 〈〉
 *
 * @author admin
 * @create 2019/1/11
 * @since 1.0.0
 */
public interface WeixinMaterialService {

    /**
     * 新增 素材
     *
     * @param forever  是否永久
     * @param is       文件流
     * @param fileName 文件名称 含后缀
     * @return MediaUploadResult
     */
    MediaUploadResult addMaterial(boolean forever, InputStream is, String fileName) throws WeixinException;


    MediaUploadResult addImageMaterial(boolean forever, String url, String fileName) throws WeixinException;

    MediaDownloadResult downloadMedia(String mediaId, boolean forever) throws WeixinException;

    JsonResult deleteMaterial(String mediaId) throws WeixinException;
}
